This line is a comment line. The // indicates that everything following it should be ignored by the compiler. This allows you to add English explanations to what might otherwise be confusing code.
A simple program Comments
//include this
file for cout
#include
<iostream.h>
int main()
{
//print out the text string,
//"Hello, World!"
cout << "Hello,
World!"
<< endl;
return 0;
}
You have the freedom to
comment your code as much as you like -- some programmers write code with no
comments at all; others write several lines of comments for each line of C++
code. It's all up to you. Keep in mind, though, that if anyone else will ever
read your code, you'll probably want to add comments. Even if you are the
only one who will ever read your code, you should add comments. It sounds
implausible, but programmers often don't understand code they've written
weeks ago!